<% content_for :javascript do %>
  <%= tinymce_assets "data-turbolinks-track": :reload %>
<% end %>

<h1>TinyMCE Helpers</h1>

<ul>
  <li><%= link_to 'Back to index', root_path %></li>

  <% if params[:locale] == "es" %>
    <li><%= link_to 'Switch to English', :locale => nil %></li>
  <% else %>
    <li><%= link_to 'Switch to Spanish', :locale => "es" %></li>
  <% end %>
</ul>

<%= text_area_tag :editor1, "", :class => "tinymce", :rows => 20, :cols => 60 %>
<%= text_area_tag :editor2, "", :class => "tinymce", :rows => 20, :cols => 60 %>

<%= tinymce :selector => "#editor1", :language => I18n.locale %>
<%= tinymce :custom, :selector => "#editor2", :language => I18n.locale %>
